{extend name='table'}

{block name="button"}

{block name="content"}
<div class="layui-tab layui-tab-card">
    <div class="layui-tab-content">
        {include file='member/index_search'}
        <table id="MemberTable" data-url="{:sysuri('index')}" data-target-search="form.form-search"></table>
    </div>
</div>
<script>
    $(function () {
        $('#MemberTable').layTable({
            even: true, height: 'full',
            cols: [[
                {checkbox: true, fixed: true},
                {field: 'account', title: '{:lang("账号")}', align: 'center', minWidth: 100},
                {field: 'nick_name', title: '{:lang("昵称")}', align: 'center', width: 100},
                {field: 'true_name', title: '{:lang("姓名")}', align: 'center', minWidth: 100},
                {field: 'platform_text', title: '{:lang("学校")}', align: 'center', minWidth: 100},
                {field: 'avatar', title: '{:lang("头像")}', align: 'center', width: 100, templet: function (d) {
                        if (!d.avatar) return '-';
                        return layui.laytpl('<div class="headimg headimg-ss shadow-inset margin-0" data-tips-image data-tips-hover data-lazy-src="{{d.avatar}}"></div>').render(d);
                    }
                },
                {field: 'mobile', title: '{:lang("手机号")}', align: 'center', minWidth: 100},
                {field: 'email', title: '{:lang("邮箱")}', align: 'center', minWidth: 100},
                {field: 'sex_text', title: '{:lang("性别")}', align: 'center', minWidth: 100},
                {field: 'job_number', title: '{:lang("学号/工号")}', align: 'center', minWidth: 100},
                {field: 'edu_background_text', title: '{:lang("学历")}', align: 'center', minWidth: 100},
                {field: 'job_depart', title: '{:lang("院系/部门")}', align: 'center', minWidth: 100},
                {field: 'major', title: '{:lang("专业")}', align: 'center', minWidth: 100},
                {field: 'create_at', title: '{:lang("创建时间")}', align: 'center', width: 150},
                {toolbar: '#toolbar', title: '{:lang("操作面板")}', align: 'center', minWidth: 180, fixed: 'right'}
            ]]
        });
    });
</script>

<script type="text/html" id="toolbar">
    <!--{if auth("remove")}-->
    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="{:lang('确定要永久删除吗？')}" data-action="{:url('remove')}" data-value="id#{{d.id}}">{:lang('删 除')}</a>
    <!--{/if}-->
</script>
{/block}